package org.hcyspartnoc.luoxin.pojo.dto.system;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hcyspartnoc.luoxin.common.constant.RegexpConstant;

import java.io.Serial;
import java.io.Serializable;

@Data
@NoArgsConstructor
public class SysUserModifyPwdDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "旧密码不能为空")
    @Pattern(regexp = RegexpConstant.PASSWORD, message = "密码格式错误")
    private String oldPwd;
    @NotNull(message = "新密码不能为空")
    @Pattern(regexp = RegexpConstant.PASSWORD, message = "密码格式错误")
    private String newPwd;
}
